package com.ruoyi.hospital.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.hospital.domain.HPatient;
import com.ruoyi.hospital.domain.ViewCpjsPatlist;
import com.ruoyi.hospital.mapper.ViewCpjsPatlistMapper;
import com.ruoyi.hospital.service.IViewCpjsPatlistService;
import org.springframework.stereotype.Service;

/**
 * 患者serviceimpl
 * @author liz
 * @date 2023-10-21 8:55
 */
@Service
public class ViewCpjsPatlistServiceImpl extends ServiceImpl<ViewCpjsPatlistMapper,ViewCpjsPatlist> implements IViewCpjsPatlistService {
    /**
     * 根据inpatientNo获取患者信息
     */
    @Override
    public ViewCpjsPatlist getPdfByInpatientNo(String id) {
        QueryWrapper queryWrapper = new QueryWrapper<ViewCpjsPatlist>();
        queryWrapper.eq("inpatient_no", id);
        ViewCpjsPatlist patient = this.getOne(queryWrapper);
        return patient;
    }
}
